<template>
	<view class="lotteryRecording">
		<view class="tabBox">
			<u-subsection :list="tabList" :current="current" active-color="#fe0000" @change="sectionChange"></u-subsection>
		</view>
		
		<view class="list" v-if="current == 0">
			<view class="item">
				<view class="codeList">
					<view class="title">第3期</view>
					<view class="codeItem" v-for="(item,index) in [0,1,2,3]">
						<view class="label">金券号</view>
						<view class="num">10334197</view>
					</view>
				</view>
			</view>
			<view class="noContent">
			  <image class="noContentImage" mode="widthFix" src="/static/noLive.png"></image>
			  <view class="text">您还没有参与抽奖</view>
			</view>
		</view>
		
		<view class="history" v-else>
			<view class="item">
				<view class="codeList" v-for="(item,index) in [0,1,2,3]">
					<view class="title">第{{item+1}}期</view>
					<view class="codeItem" v-for="(item,index) in [0,1,2,3]">
						<view class="label">金券号</view>
						<view class="num">10334197</view>
					</view>
				</view>
			</view>
			<view class="noContent">
			  <image class="noContentImage" mode="widthFix" src="/static/noLive.png"></image>
			  <view class="text">没有相关内容</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabList: [{
					name: '进行中'
				}, 
				{
					name: '往期'
				}],
				current: 0
			}
		},
		methods: {
			sectionChange (index) {
				this.current = index;
			}
		}
	}
</script>

<style scoped lang="scss">
.lotteryRecording {
	padding: 130rpx 0 24rpx;
	background-color: var(--bgColor);
	min-height: 100%;
	.tabBox {
		padding: 20rpx 24rpx;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 100;
		width: 750rpx;
		background-color: #FFFFFF;
	}
	.list {
		padding: 0 24rpx;
		.codeList {
			background-color: #FFFFFF;
			padding: 0 20rpx 20rpx;
			border-radius: 8rpx;
			.title {
				text-align: center;
				padding: 20rpx 0;
				border-bottom: 1rpx dashed #EEEEEE;
			}
			.codeItem {
				margin: 20rpx 20rpx 0;
				display: flex;
				align-items: center;
				border: 1rpx solid #C24242;
				border-radius: 8rpx;
				.label {
					background-color: #C24242;
					padding: 16rpx 20rpx;
					color: #FFFFFF;
				}
				.num {
					margin-left: 16rpx;
					font-size: 32rpx;
					font-weight: 600;
					color: #C24242;
				}
			}
		}
	}
	.history {
		padding: 0 24rpx;
		.codeList {
			background-color: #FFFFFF;
			padding: 0 20rpx 20rpx;
			border-radius: 8rpx;
			margin-bottom: 20rpx;
			&:last-of-type {
				margin-bottom: 0;
			}
			.title {
				text-align: center;
				padding: 20rpx 0;
				border-bottom: 1rpx dashed #EEEEEE;
			}
			.codeItem {
				margin: 20rpx 20rpx 0;
				display: flex;
				align-items: center;
				border: 1rpx solid #C24242;
				border-radius: 8rpx;
				.label {
					background-color: #C24242;
					padding: 16rpx 20rpx;
					color: #FFFFFF;
				}
				.num {
					margin-left: 16rpx;
					font-size: 32rpx;
					font-weight: 600;
					color: #C24242;
				}
			}
		}
	}
}	
</style>
